package com.cuiweiyou.middleman;

import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.res.AssetManager;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.Looper;
import android.os.PersistableBundle;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

import androidx.appcompat.app.AppCompatActivity;

import java.util.concurrent.Executor;

/**
 * Activity的生命周期接口
 * 插件的Activity都须实现此接口
 */
public interface IPluginActivity {
    public void attach(AppCompatActivity rootActivity);
    public void onCreate( Bundle savedInstanceState);
    public void onNewIntent(Intent intent);
    public void onStart();
    public void onRestart();
    public void onResume();
    public void onPause();
    public void onStop();
    public void onDestroy();
    public void setContentView(View view);
    public void setContentView(int layoutResID);
    public <T extends View> T findViewById(int id);
    public Intent getIntent();
    public void onSaveInstanceState(Bundle outState);
    public void onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState);
    public boolean onKeyDown(int keyCode, KeyEvent event);
    public void onBackPressed();
    public void onTouchEvent();
    public LayoutInflater getLayoutInflater();
    public ClassLoader getClassLoader();
    public Context getBaseContext();
    public AssetManager getAssets();
    public Resources getResources();
    public PackageManager getPackageManager();
    public ContentResolver getContentResolver();
    public Looper getMainLooper();
    public Executor getMainExecutor();
    public Context getApplicationContext();
    public void startActivity(Intent intent);
    public void startActivityForResult(Intent intent, int requestCode);
    public WindowManager getWindowManager();
    public ApplicationInfo getApplicationInfo();
    public Window getWindow();
}
